/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2020-2020. All rights reserved.
 * Description: gradient Split Tune log module
 * Author: zhaohuailong
 * Create: 2020-10-12
 */

#ifndef TUNE_LOG_H
#define TUNE_LOG_H

#include "slog.h"

#define TUNE_ERROR(fmt, args...)  dlog_error(HCCL, "%s(%d) : " fmt, __func__, __LINE__, ##args)
#define TUNE_WARN(fmt, args...) dlog_warn(HCCL, "%s(%d) : " fmt, __func__, __LINE__, ##args)
#define TUNE_INFO(fmt, args...) dlog_info(HCCL, "%s(%d) : " fmt, __func__, __LINE__, ##args)
#define TUNE_DEBUG(fmt, args...)  dlog_debug(HCCL, "%s(%d) : " fmt, __func__, __LINE__, ##args)
#define TUNE_EVENT(fmt, args...)  dlog_event(HCCL, "%s(%d) : " fmt, __func__, __LINE__, ##args)
#define TUNE_CHK_RET(result, exeLog, retCode) do { \
    if (result) {                                                                       \
        exeLog;                                                                     \
        return retCode;                                               \
    }                                                                                \
} while (0)
#endif
